import request from '@/utils/request'

// 根据药品编号查询列表
export function selectDrugByCode(query) {
  return request({
    url: '/drug/intermediate/selectDrugCode',
    method: 'get',
    params: query
  })
}

// 查询药品入库和药品中间列表
export function listIntermediate(query) {
  return request({
    url: '/drug/intermediate/list',
    method: 'get',
    params: query
  })
}

// 查询药品入库和药品中间详细
export function getIntermediate(id) {
  return request({
    url: '/drug/intermediate/' + id,
    method: 'get'
  })
}

// 新增药品入库和药品中间
export function addIntermediate(data) {
  return request({
    url: '/drug/intermediate',
    method: 'post',
    data: data
  })
}

// 修改药品入库和药品中间
export function updateIntermediate(data) {
  return request({
    url: '/drug/intermediate',
    method: 'put',
    data: data
  })
}

// 删除药品入库和药品中间
export function delIntermediate(id) {
  return request({
    url: '/drug/intermediate/' + id,
    method: 'delete'
  })
}
